package com.loy;

import com.loy.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 主要测试spring启动流程
 */
public class Test_01_spring_qidong_liucheng {


        public static void main(String[] args) {
           AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
           UserService userService = context.getBean("userService", UserService.class);
           userService.test1();
            context.setClassLoader(AppConfig.class.getClassLoader());
           context.getEnvironment().setRequiredProperties("ggg");

           context.refresh();
           context.refresh();
        }
}
